I'll suggest that you print some environment variables to check if the paths for the shared libraries are OK.
So, from the environment you are trying to execute your python script, try to print PATH, PYTHONPATH and DYLD_LIBRARY_PATH
Even better, you can try to print this from your python script with something like this
import os print os.environ['PATH'] print os.environ['DYLD_LIBRARY_PATH'] print os.environ['PYTHONPATH']The check if the missing path is listed somewhere